﻿using System.Collections.Generic;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.Orders;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.Order
{
    public interface IPrePayOrderMainRepository
    {
        #region 删除

        void DeleteOrder(string sno, UnitOfWork unit = null);

        #endregion

        #region 保存

        /// <summary>
        ///     新增
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void AddMainInfo(PrePayOrderMainInfoEntity entity, UnitOfWork unit = null);

        #endregion

        #region 查询

        /// <summary>
        ///     根据sno 获取order主表信息
        /// </summary>
        /// <param name="sno"></param>
        /// <returns></returns>
        PrePayOrderMainInfoEntity GetOrderMainBySno(string sno);

        /// <summary>
        ///     查询所有单据主表信息
        /// </summary>
        /// <returns></returns>
        IList<PrePayOrderMainInfoEntity> GetOrders(long custid);

        #endregion
    }
}